Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds flag to install specified version #7

Merged
merged 3 commits into from
Oct 28, 2023

Conversation

VassilisPallas
Copy link
Owner

@VassilisPallas VassilisPallas commented Oct 28, 2023

Description

Introduces a new flag, that can be used to specify which version should be installed, without the usage of the dropdown. This is useful for usage in CI etc.

The flag is called install-version and can be used like:

$ gvs --install-version 1.23

The accepted version is the one that satisfies the regex (\d{1,2})(\.?\d{1,2})?(\.?\d{1,2}|rc\d{1,2})?. This means the version requires the Major version, while the Minor, Patch and Release Candidates can be optional.

If any of the Minor, Patch and Release Candidates is omitted, the latest one will be selected.

Examples:

$  gvs --install-version 1

Will install the latest 1.xx.zz version, where xx will be the latest minor version for version 1, and zz the latest patch version for the version 1.xx.

$  gvs --install-version 1.20

Will install the latest 1.20.zz version, where zz is the latest patch version for the version 1.20.

$  gvs --install-version 1.20.3

Will install the version 1.20.3.

$  gvs --install-version 1.20rc2

Will install the version 1.20rc2.

If the given version is incorrect, an error will be returned to the user.

How to test that change

  1. Build the cli
  2. try the above examples

Checklist

Tests

  • I've added integration tests
  • I've added unit tests

Documentation

  • I've updated readme

Review process

  • The title is in present tense and includes the issue number
  • I've used conventional commits
  • I have added the issue link on the PR

@VassilisPallas VassilisPallas merged commit 27d93e9 into main Oct 28, 2023
1 check passed
@VassilisPallas VassilisPallas deleted the feat/install-specific-version-from-flag branch October 28, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant